package com.corona.game;

import com.corona.Game;

/* compiled from: Battle.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/CheckShouldSwitch.class */
public class CheckShouldSwitch extends Action {
    public Action.Layer layer = Action.Layer.map_129;

    public CheckShouldSwitch(Action nextAction) {
        super(new Object[0]);
        this.nextAction = nextAction;
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        game.actionStack.remove(this);
        if (game.player.currPokemon.currentStats.get("hp").intValue() > 0) {
            game.insertAction(this.nextAction);
            return;
        }
        game.battle.network.expectPlayerSwitch = true;
        game.insertAction(new DisplayText.Clear(game, new WaitFrames(game, 3, new DrawPokemonMenu.Intro(new DrawPokemonMenu(game, null)))));
    }
}
